/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mattespill.gui;

import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import mattespill.Oversikt;
/**
 *
 * @author auchaunn
 */

public class GUIGameOver extends JPanel{
    ImageIcon goImg = new ImageIcon("src/mattespill/gui/images/gameover.png");
    JLabel  bilde = new JLabel(goImg);
    Oversikt o;
    Muslytter m = new Muslytter();
    
    //GUIGameOver public 
    public GUIGameOver(Oversikt o){
        setLayout(new BorderLayout());
        this.o = o;
        setBackground(new Color(255,255,255,0));
        addMouseListener(m);
        bilde.setBounds(0,0,0,0);
        
        add(bilde, BorderLayout.NORTH);
        
            }
        
    
    
    private class Muslytter implements MouseListener{
    
 
   

        public void mouseClicked(MouseEvent me) {
            
                GUIFortsett f = new GUIFortsett(o);
                JPanel mainPanel = (JPanel)getParent();
                mainPanel.removeAll(); // dette is the sub-panel
                mainPanel.add(f);
                mainPanel.repaint();
                mainPanel.revalidate();
                f.repaint();
            
        }

        public void mousePressed(MouseEvent me) {
        }

        public void mouseReleased(MouseEvent me) {
        }

        public void mouseEntered(MouseEvent me) {
        }

        public void mouseExited(MouseEvent me) {
        }
    }
}
    /*
    private class GameOverImage extends JPanel{
        public GameoverImage(){
            ImageIcon image = ImageIcon();
        }
    }

    private class GameOverAnimation extends JPanel{
        private Timer timer;
        
        public GameOverAnimation(){
         //   ImageIcon image = ImageIcon()
            setBackground(Color.BLACK);
            
        
        }
    }
      

     */

    
    


    

